#!/bin/sh
kill -2 $(ps aux | grep Pritunl.app | awk '{print $2}') || true
launchctl unload /Library/LaunchAgents/com.pritunl.client.plist || true
launchctl unload /Library/LaunchDaemons/com.pritunl.service.plist || true

rm -rf /var/lib/pritunl || true
rm -f /var/log/pritunl.log || true
rm -f /var/log/pritunl-client.log || true
kextunload -b net.sf.tuntaposx.tap || true
kextunload -b net.sf.tuntaposx.tun || true
rm -rf /Library/Extensions/tap.kext || true
rm -rf /Library/Extensions/tun.kext || true
rm -f /Library/LaunchAgents/com.pritunl.client.plist || true
rm -f /Library/LaunchDaemons/net.sf.tuntaposx.tap.plist || true
rm -f /Library/LaunchDaemons/net.sf.tuntaposx.tun.plist || true
rm -rf /usr/local/bin/pritunl-openvpn || true
rm -rf /usr/local/bin/pritunl-service || true
